package cn.wanho.dao;

import cn.wanho.dto.CmsClass;
import cn.wanho.rvo.ClassVO;
import cn.wanho.rvo.selectPresentClassVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * @Author: FXP
 * @Date: 2022/08/04/9:48
 * @Description: 
 */
@Mapper
public interface CmsClassMapper {
    /**
     * 创建班级
     * @param calssName
     * @return
     */
    int insertClass(String calssName);


    /**
     * 查看该老师当前所带的班级
     * @param teacherId
     * @return
     */
    List<CmsClass> selectTeacherInClass(Integer teacherId);

    /**
     * 目前授课的班级以及对阶段和目前当前所处阶段完结剩余的时间
     * @param teacherId
     * @return
     */
    List<selectPresentClassVO> selectPresentClass(Integer teacherId);

    /**
     * 查询所有班级
     * @return
     */
    List<ClassVO> selectAllClass();

    /**
     * 查找班级（班级名）
     * @param className
     * @return
     */
    List<CmsClass> selectByName(String className);









    /**
     *
     * @param record the record
     * @return insert count
     */
    int insert(CmsClass record);

    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(CmsClass record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    CmsClass selectByPrimaryKey(Integer id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(CmsClass record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(CmsClass record);
}